import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';

// 自定义滑动动画
class SlideAnimation extends StatelessWidget {
  final Widget child;
  final Duration duration;

  const SlideAnimation({
    super.key,
    required this.child,
    this.duration = const Duration(milliseconds: 500),
  });

  @override
  Widget build(BuildContext context) {
    return child.animate().slide(duration: duration);
  }
}
